// ==================================================================================================
// Copyright(C) 2018 FI Ltd. All rights reserved.
//
// SYSTEM NAME	   : FI.Net Application Framework
// COMPONENT ID	   : FI.Helpers.Data.PrimaryKeyNotFoundException
// COMPONENT DESC  :		
//
// CREATED DATE/BY :	18 Aug 2018 / Tian Mi
//
// REVISION HISTORY:	DATE/BY			SR#/CS/PM#/OTHERS		DESCRIPTION OF CHANGE
// ==================================================================================================

using System;
using System.Runtime.Serialization;

namespace FI.Helpers.Data
{
    /// <summary>
    /// Can not found primary key in dataTable
    /// </summary>
    [Serializable]
    public class PrimaryKeyNotFoundException : Exception
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="PrimaryKeyNotFoundException"/> class.
        /// </summary>
        public PrimaryKeyNotFoundException()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="PrimaryKeyNotFoundException"/> class.
        /// </summary>
        /// <param name="message">The message.</param>
        public PrimaryKeyNotFoundException(string message)
                : base(message)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="PrimaryKeyNotFoundException"/> class.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="innerException">The inner exception.</param>
        public PrimaryKeyNotFoundException(string message, Exception innerException)
                : base(message, innerException)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="PrimaryKeyNotFoundException"/> class.
        /// </summary>
        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> that holds the serialized object data about the exception being thrown.</param>
        /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"></see> that contains contextual information about the source or destination.</param>
        /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult"></see> is zero (0). </exception>
        /// <exception cref="T:System.ArgumentNullException">The info parameter is null. </exception>
        protected PrimaryKeyNotFoundException(SerializationInfo info, StreamingContext context)
                : base(info, context)
        {
        }
    }
}